package com.example.larou.Impl;

import cn.dev33.satoken.util.SaResult;
import com.example.larou.entity.Item;
import com.example.larou.mapper.ItemMapper;
import com.example.larou.utils.Adapter;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class UpdateItemServiceImpl extends Adapter {
    @Resource
    private ItemMapper itemMapper;
    public SaResult updateItem(Long id,Item item){
        boolean update = itemMapper.updateItem(id,item.getItem_name());
        if (update){
            return  SaResult.ok("更新物品成功");
        }
        return SaResult.error("更新失败");
    }

}
